﻿using AutoMapper;
using BCDto.MySql.FreightConfigurationExtention;
using BCDto.TMS.FreightConfiguration;
using BCDto.TMS.NightFreightConfiguration;
using BCEntity.MySql.FreightConfigurationExtention;
using BCEntity.TMS.Agent.AgentNightFreightConfiguration;
using BCEntity.TMS.FreightConfiguration;
using BCEntity.TMS.NightFreightConfiguration;

namespace BCService.MapperProfiles.TMS.FreightConfiguration
{
    public class FreightConfigurationProfile : Profile
    {
        public FreightConfigurationProfile()
        {
            CreateMap<FreightConfigurationRequestDto, FreightConfigurationEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<FreightConfigurationEntity, FreightConfigurationDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<FreightConfigurationExpandEntity, FreightConfigurationDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<FreightConfigurationExpandEntity, FreightConfigurationEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<FreightConfigurationListRequestDto, FreightConfigurationViewEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            CreateMap<FreightConfigurationExtentionRequestDto, FreightConfigurationExtentionEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<FreightConfigurationExtentionEntity, FreightConfigurationExtentionDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<FreightConfigExtentionListRequestDto, FreightConfigurationExtentionViewEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<FreightConfigurationExtentionExpandEntity, FreightConfigurationExtentionDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<FreightConfigurationExtentionPutDto, FreightConfigurationExtentionEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //夜间运费配置
            CreateMap<NightFreightConfigurationEntity, NightFreightConfigurationDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<NightFreightConfigurationDto, NightFreightConfigurationEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<NightFreightConfigurationEntity, NightFreightConfigurationViewDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<AgentNightFreightConfigurationEntity, NightFreightConfigurationDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<AgentNightFreightConfigurationEntity, NightFreightConfigurationViewDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
        }
    }
}
